// Fill out your copyright notice in the Description page of Project Settings.

#include "WorldRoadObjectParts.h"
#include "WorldEntityReferencing.h"

WORLD_ENTITY_META_DEFINE(FWorldRoadObjectParkingSpaceMarking, FWorldEntityPart);

FWorldRoadObjectParkingSpaceMarking::FWorldRoadObjectParkingSpaceMarking()
	: Super()
	, Side(this, FWorldRoadObjectParkingSpaceMarkingSide::Front)
	, Type(this, FWorldRoadMarkKind::Curb)
	, Width(this, 0.0)
	, Color(this, FWorldRoadMarkColor::Standard)
{}

FWorldRoadObjectParkingSpaceMarking::FWorldRoadObjectParkingSpaceMarking(FWorldEntityPart* parent, const pugi::xml_node& elem)
	: Super(parent, elem)
	, Side(this, FWorldRoadObjectParkingSpaceMarkingSide::Front, elem, "side")
	, Type(this, FWorldRoadMarkKind::Curb, elem, "type")
	, Width(this, 0.0, elem, "width")
	, Color(this, FWorldRoadMarkColor::Standard, elem, "color")
{}

FWorldRoadObjectParkingSpaceMarking::~FWorldRoadObjectParkingSpaceMarking()
{}

WORLD_ENTITY_META_DEFINE(FWorldRoadObjectParkingSpace, FWorldEntityPart);

FWorldRoadObjectParkingSpace::FWorldRoadObjectParkingSpace()
	: Super()
	, Access(this, FWorldRoadObjectParkingSpaceAccess::All)
	, Restrictions(this, "")
	, Marking(this)
{}

FWorldRoadObjectParkingSpace::FWorldRoadObjectParkingSpace(FWorldEntityPart* parent, const pugi::xml_node& elem)
	: Super(parent, elem)
	, Access(this, FWorldRoadObjectParkingSpaceAccess::All, elem, "access")
	, Restrictions(this, "", elem, "restrictions")
	, Marking(this, elem, "marking")
{}

FWorldRoadObjectParkingSpace::~FWorldRoadObjectParkingSpace()
{}

void FWorldRoadObjectParkingSpace::Resolve(FWorldEntityReferencing& referencing)
{
	Super::Resolve(referencing);
	referencing
		.Resolve(Marking);
}

WORLD_ENTITY_META_DEFINE(FWorldRoadObjectMaterial, FWorldEntityPart);

FWorldRoadObjectMaterial::FWorldRoadObjectMaterial()
	: Super()
	, Surface(this, "")
	, Friction(this, 0.0)
	, Roughness(this, 0.0)
{}

FWorldRoadObjectMaterial::FWorldRoadObjectMaterial(FWorldEntityPart* parent, const pugi::xml_node& elem)
	: Super(parent, elem)
	, Surface(this, "", elem, "surface")
	, Friction(this, 0.0, elem, "friction")
	, Roughness(this, 0.0, elem, "roughness")
{}

FWorldRoadObjectMaterial::~FWorldRoadObjectMaterial()
{}

WORLD_ENTITY_META_DEFINE(FWorldRoadObjectCornerLocal, FWorldEntityPart);

FWorldRoadObjectCornerLocal::FWorldRoadObjectCornerLocal()
	: Super()
	, U(this, 0.0)
	, V(this, 0.0)
	, Z(this, 0.0)
	, Height(this, 0.0)
{}

FWorldRoadObjectCornerLocal::FWorldRoadObjectCornerLocal(FWorldEntityPart* parent, const pugi::xml_node& elem)
	: Super(parent, elem)
	, U(this, 0.0, elem, "u")
	, V(this, 0.0, elem, "v")
	, Z(this, 0.0, elem, "z")
	, Height(this, 0.0, elem, "height")
{}

FWorldRoadObjectCornerLocal::~FWorldRoadObjectCornerLocal()
{}

WORLD_ENTITY_META_DEFINE(FWorldRoadObjectCornerRoad, FWorldEntityPart);

FWorldRoadObjectCornerRoad::FWorldRoadObjectCornerRoad()
	: Super()
	, S(this, 0.0)
	, T(this, 0.0)
	, Dz(this, 0.0)
	, Height(this, 0.0)
{}

FWorldRoadObjectCornerRoad::FWorldRoadObjectCornerRoad(FWorldEntityPart* parent, const pugi::xml_node& elem)
	: Super(parent, elem)
	, S(this, 0.0, elem, "s")
	, T(this, 0.0, elem, "t")
	, Dz(this, 0.0, elem, "dz")
	, Height(this, 0.0, elem, "height")
{}

FWorldRoadObjectCornerRoad::~FWorldRoadObjectCornerRoad()
{}

WORLD_ENTITY_META_DEFINE(FWorldRoadObjectOutline, FWorldEntityPart);

FWorldRoadObjectOutline::FWorldRoadObjectOutline()
	: Super()
	, CornerRoad(this)
	, CornerLocal(this)
{}

FWorldRoadObjectOutline::FWorldRoadObjectOutline(FWorldEntityPart* parent, const pugi::xml_node& elem)
	: Super(parent, elem)
	, CornerRoad(this, elem, "cornerRoad")
	, CornerLocal(this, elem, "cornerLocal")
{}

FWorldRoadObjectOutline::~FWorldRoadObjectOutline()
{}

void FWorldRoadObjectOutline::Resolve(FWorldEntityReferencing& referencing)
{
	Super::Resolve(referencing);
	referencing
		.Resolve(CornerRoad)
		.Resolve(CornerLocal);
}

WORLD_ENTITY_META_DEFINE(FWorldRoadObjectRepeat, FWorldEntityPart);

FWorldRoadObjectRepeat::FWorldRoadObjectRepeat()
	: Super()
	, S(this, 0.0)
	, Length(this, 0.0)
	, Distance(this, 0.0)
	, TStart(this, 0.0)
	, TEnd(this, 0.0)
	, WidthStart(this, 0.0)
	, WidthEnd(this, 0.0)
	, HeightStart(this, 0.0)
	, HeightEnd(this, 0.0)
	, ZOffsetStart(this, 0.0)
	, ZOffsetEnd(this, 0.0)
{}

FWorldRoadObjectRepeat::FWorldRoadObjectRepeat(FWorldEntityPart* parent, const pugi::xml_node& elem)
	: Super(parent, elem)
	, S(this, 0.0, elem, "s")
	, Length(this, 0.0, elem, "length")
	, Distance(this, 0.0, elem, "distance")
	, TStart(this, 0.0, elem, "tStart")
	, TEnd(this, 0.0, elem, "tEnd")
	, WidthStart(this, 0.0, elem, "widthStart")
	, WidthEnd(this, 0.0, elem, "widthEnd")
	, HeightStart(this, 0.0, elem, "heightStart")
	, HeightEnd(this, 0.0, elem, "heightEnd")
	, ZOffsetStart(this, 0.0, elem, "zOffsetStart")
	, ZOffsetEnd(this, 0.0, elem, "zOffsetEnd")
{}

FWorldRoadObjectRepeat::~FWorldRoadObjectRepeat()
{}
